<template>
  <el-button type="text" @click="handleQueryDetail">
    <slot></slot>
  </el-button>
</template>

<script>
export default {
  props: {
    record: {
      type: Object,
      required: true
    },
    salesMan: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    // 查询供应商详情
    handleQueryDetail() {
      console.log('record', this.record)
      const name = this.salesMan ? 'supplierDetailBasic' : 'supplierDetailBasic'
      this.$router.push({
        name,
        params: { obj: this.record, from: 'supplier' }
      })
      // this.$emit('detail', record)
    }
  }
}
</script>

<style>
</style>